Using StackOverflow content to assist in code review

نویسندگان

  • Balwinder Sodhi
  • Shipra Sharma
چکیده

An important goal for programmers is to minimize cost of identifying and correcting defects in source code. Code review is commonly used for identifying programming defects. However, manual code review has some shortcomings: a) it is time consuming, b) outcomes are subjective and depend on the skills of reviewers. An automated approach for assisting in code reviews is thus highly desirable. We present a tool for assisting in code review and results from our experiments evaluating the tool in different scenarios. The tool leveraged content available from professional programmer support forums (e.g. StackOverflow.com) to determine potential defectiveness of a given piece of source code. The defectiveness is expressed on the scale of {Likely defective, Neutral, Unlikely to be defective}. Basic idea employed in the tool is to: a) Identify a set P of discussion posts on StackOverflow such that each p ∈ P contains source code fragment(s) which sufficiently resemble the input code C being reviewed. b) Determine the likelihood of C being defective by considering all p ∈ P . A novel aspect of our approach is to use document fingerprinting for comparing two pieces of source code. Our choice of document fingerprinting technique is inspired by source code plagiarism detection tools where it has proven to be very successful. In the experiments that we performed to verify effectiveness of our approach source code samples from more than 300 GitHub open source repositories were taken as input. A precision of more than 90% in identifying correct/relevant results has been achieved.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On code reuse from StackOverflow: An exploratory study on Android apps

Context: Source code reuse has been widely accepted as a fundamental activity in software development. Recent studies showed that StackOverflow has emerged as one of the most popular resources for code reuse. Therefore, a plethora of work proposed ways to optimally ask questions, search for answers and find relevant code on StackOverflow. However, little work studies the impact of code reuse fr...

متن کامل

Subjective Evaluation of Software Quality Using Crowdsource Knowledge: An Exploratory Study

While subjective judgments have been heavily used in other areas of research including science, humanities, medical studies, and even in human computer interaction, there has been a marked lack on the use of such human factors in evaluating the quality of a software system. In this paper, we explore an idea of using subjective judgements in evaluating the code quality of a software system by us...

متن کامل

Improving the Retrieval of Related Questions in StackOverflow

OF THE THESIS Improving the Retrieval of Related Questions in StackOverflow By Rezvan Ghaderi MASTER OF SCIENCE in Information and Computer Science University of California, Irvine, 2015 Professor Cristina V. Lopes, Chair StackOverflow is a very popular Q&A website, known to all software developers. Developers can either post their coding questions on the website to be answered by other develop...

متن کامل

Predicting Tags for StackOverflow Questions

We present a system that is able to automatically assign tags to questions from the question-answering site StackOverflow. Our system consists of a programming language detection system and a SVM using content-based features. When testing on an unseen test set, we achieve a mean F1 of 0.41 on this task.

متن کامل

Tag Recommendations in StackOverflow

Many social information websites require users to organize content by marking user generated content with “tags”. In order for such sites to maintain their organization, this tagging process should be as accurate as possible. One way the website can facilitate accurate tagging is to recommend tags for users based on the content they generate. For our project, we will study tag recommendations i...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2018